import { useEffect, useRef, useState } from 'react';
import { Modal, Input, Row, Col } from 'antd';
const { TextArea } = Input;


const CommendModal = (props) => {
  const [commend, setCommend] = useState('');
  const { visible, updateCommend, closeModal, commentMark } = props;
  
  const handleOk = () => {
    updateCommend(commend)
  }
  const changeCommend = (e) => {
    setCommend(e.target.value)
  }



  return (
    <Modal title={commentMark == '1' ? '审批意见' : '驳回意见'} visible={visible} onOk={handleOk} onCancel={closeModal}>
        <Row>
            <Col span={4}>意见：</Col>
            <Col span={16}><TextArea placeholder='请填入意见' value={commend} onChange={changeCommend}></TextArea></Col>
        </Row>
    </Modal>
  )
}

export default CommendModal